<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*" pageEncoding="UTF-8"%>


<%@ page import="java.util.*" %>
<%@ page import="beans.*" %>
<%@ page import="dao.*" %>
<link href="form.css" rel="stylesheet" type="text/css">
 <!DOCTYPE HTML >
 <html>
   <head>
     <title>详细信息</title>
     
     <script>
     function checknull(){
    	/* 
    	
   
    	
    	 if(name.value==null  || phone.value==null){
    		 window.alert("带*为必填项！");
    	 }
    	 else{
    		 addinformation.submit();
    	 }
    */
    	 addinformation.submit();
     }
     
     
     
     </script>
     
   </head>
   <body background="bg8.jpg" style=" background-repeat:no-repeat;
      background-size:100%100%;background-attachment:fixed;">
   <%

TxlDao txldao=new TxlDao();

ArrayList persons=txldao.selectinformation(request.getParameter("name"));
//ArrayList persons=(ArrayList)request.getAttribute("Persons");
			Person person =(Person)persons.get(0);
		%>
		<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
		<form action="Update?id=<%=person.getId()%>" method="post" class="dark-matter" name="addinformation">
<h1>个人通讯录信息（带*为必填项）
<span>Please fill all the texts in the fields.</span>
</h1>
<label>
<span>*学号 :</span>
<input  type="text" style="width:0px"/>
<span><%=person.getId()%></span><br>
</label>

<label>
<span>*姓名 :</span>
<input  type="text" name="name" value="<%=person.getName() %>" placeholder="姓名" />
</label>

<label>
<span>*电话 :</span>
<input  type="text" name="phone" value="<%=person.getPhone() %>" placeholder="电话" />
</label>

<label>
<span>QQ号 :</span>
<input  type="text" name="qq" value="<%=person.getQQ() %>" placeholder="QQ号" />
</label>

<label>
<span>Email :</span>
<input  type="email" name="email" value="<%=person.getEmail() %>" placeholder="电子邮件地址" />
</label>

<label>
<span>地址 :</span>
<input  type="text" name="address" value="<%=person.getAddress()%>" placeholder="地址" />
</label>


<label>
<span>最近修改者 ：</span>
<input  type="text" style="width:0px"/>
<%if(person.getChanger()!=null){
	
%>
<span><%=person.getChanger()%></span><br>
<% 
} else{
%>
<span>无</span><br>
<%	
}
%>

</label>

<label>
<span>&nbsp;</span>
<input type="button" class="button" value="修改完成" onClick="checknull()" />


</label>
</form>
		
	
   </body>
 </html>
 
 
 
 
 
 